<!-- subpkg_medicine/pay_result/index.vue -->
<script setup>
import { ref } from 'vue';
import { showOrderAPI } from '@/apis/doct';
    const props=defineProps({
		orderId:String
	})
	
	const orderDetail=ref({})
	// 获取药品订单详情
	const getshowOrder=()=>{
		showOrderAPI(props.orderId).then((res)=>{
			console.log(res);
			orderDetail.value=res.data
		})
	}
	
	
	// 获取药品订单详情
	getshowOrder()
</script>
<template>
  <view class="pay-result-page">
    <view class="result">
      <uni-icons size="70" color="#20c6b2" type="checkbox-filled" />
      <view class="amount">¥ {{orderDetail.actualPayment}}</view>
      <view class="label"> {{orderDetail.statusValue}} </view>
      <view class="tips" v-if="orderDetail.status==11"> 订单支付成功，已通知药房尽快发出，请耐心等待~</view>
      <view class="tips" v-if="orderDetail.status==10"> 订单待支付，请尽快支付....</view>
    </view>

    <view class="buttons">
      <navigator
        hover-class="none"
        :url="`/subpack_medicine/orderDetail/index?id=${orderDetail.id}`"
        class="uni-button"
      >
        查看订单
      </navigator>
      <navigator
        hover-class="none"
        :url="`/subpack_consult/room/index?orderId=${orderDetail.roomId}`"
        open-type="redirect"
        class="uni-button plain"
      >
        返回诊室
      </navigator>
    </view>
  </view>
</template>

<style lang="scss">
  // subpkg_medicine/pay_result/index.scss
  .pay-result-page {
    padding: 100rpx 60rpx;
  }
  
  .result {
    line-height: 1;
    text-align: center;
  
    .amount {
      font-size: 44rpx;
      font-weight: 600;
      color: #333;
      margin-top: 30rpx;
    }
  
    .label {
      font-size: 28rpx;
      color: #3c3e42;
      margin-top: 20rpx;
    }
  
    .tips {
      line-height: 1.5;
      padding: 0 70rpx;
      font-size: 28rpx;
      color: #979797;
      margin-top: 40rpx;
    }
  }
  
  .buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 60rpx;
  }
  
  .uni-button {
    width: 280rpx;
  
    &.plain {
      background-color: #fff;
      color: #20c6b2;
      border: 1px solid #20c6b2;
    }
  }
</style>